package com.market.manage.controller;

import com.market.manage.service.CheckService;
import com.market.po.Result;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 人脸识别考勤
 */
@CrossOrigin
@RestController
@RequestMapping(value = "/check")
public class CheckController {

    @Resource
    private CheckService checkServiceImpl;

    /**
     * 上下班打卡
     *
     * @param userId
     * @param base64
     * @return
     */
    @PostMapping("/face")
    public Result face(Long userId, String base64, String status) {
        return checkServiceImpl.checkFace(userId, base64, status);
    }

}
